import { createHashRouter } from 'react-router-dom'

import Newlist from '../pages/router-base-v6/Newlist'
import FoodList from '../pages/router-base-v6/FoodList'
import Fooddetail from '../pages/router-base-v6/Fooddetail'
import NotFound from '../pages/router-base-v5/NotFound'
import Newdetail from '../pages/router-base-v6/Newdetail'
import Layout from '../pages/router-base-v6/Layout'
import Employee from '../pages/router-v5-nest/Employee'
import Salary from '../pages/router-v5-nest/Salary'
import Login from '../pages/router-base-v6/Login'

import ReduxPage from '../pages/redux/index'
const router = createHashRouter([
  {
    path: '/',
    element: <Login />
  },
  {
    path: '/newlist',
    element: <Newlist />
  },
  {
    path: '/newdetail',
    element: <Newdetail />
  },
  {
    path: '/foodList',
    element: <FoodList />
  },
  {
    path: '/fooddetail/:id/:name',
    element: <Fooddetail />
  },
  {
    path: '/login',
    element: <Login />
  },
  {
    path: '*',
    element: <NotFound />
  },
  {
    path: '/layout',
    element: <Layout />,
    children: [
      {
        path: 'employee',
        element: <Employee />
      },
      {
        path: 'salary',
        element: <Salary />
      }
    ]
  },
  {
    path: 'redux',
    element: <ReduxPage />
  }
])

export default router
